﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using C = System.Console;

namespace Edu.Console
{
    /// <summary>
    /// The arrays
    /// </summary>
    public static class Arrays
    {
        public static int[] IntArray = new [] { 1, 2, 3, 4, 5, 6, 7 };
        public static int[,] d2array = new int[5, 6];
        public static int[, ,] d3array = new int[5, 6, 10];

        public static int [][] myarr = new int [5][];

        public static void WriteArrayInfo(System.Array tmparr)
        {
            C.WriteLine("myarr type = {0}, rank = {1}, length = {2}, realType = {3} ",
                       tmparr.GetType().Name,
                       tmparr.Rank,
                       tmparr.Length,
                       tmparr.GetType().IsValueType);
        }

        public static void Lesson()
        {

            WriteArrayInfo(Arrays.IntArray);
            WriteArrayInfo(Arrays.d2array);
            WriteArrayInfo(Arrays.d3array);
            WriteArrayInfo(Arrays.myarr);

            var d3Type = d3array.GetType();
            
            
        }
    }
}
